package homework1;

import java.util.ArrayList;
import java.util.Scanner;

public class FindForeSameNumber {
public static void main (String[] args) {
	boolean l = false;
	System.out.println("请输入整数的个数");
	Scanner sc = new Scanner(System.in);
	int num = sc.nextInt();
	System.out.println("请输入整数");
	int[] a = new int[num];
	for(int i=0;i<num;i++) {
       a[i]=sc.nextInt();
       if(i==num-1)
    	   System.out.println("输入完成");
	}
	for(int i=0;i<num;i++)
	{
		System.out.println(a[i]);
	}
	for(int i=0;i<num-4;i++)
	{
		if(a[i]==a[i+1]&&a[i]==a[i+2]&&a[i]==a[i+3])
        l=true;
	}
	if (l==true)
		System.out.println("是四个连续相等的数");
	else
		System.out.println("不是四个连续相等的数");
}
}
